﻿@{
    ViewBag.Title = "JcShenpi";
    Layout = "~/Views/Shared/ShouYe.cshtml";
}
@model UI.ServiceReference1.奖惩
<script src="~/BootstrapSouce/js/jquery.min.js"></script>
<link href="~/BootstrapSouce/css/bootstrap.min.css" rel="stylesheet" />
<script src="~/BootstrapSouce/js/bootstrap.min.js"></script>
<h5>审批</h5>
<div style="width:300px;margin-left:25%">
    <table class="table table-bordered table-hover definewidth m10" id="tb">
        <tr>
            <td>姓名：<input id="DangAn_Name" type="text" name="DangAn_Name" value="@Model.姓名" onfocus=this.blur() style="border:0px; width:60px" /><input id="Text1" type="hidden" value="@Model.ID" /></td>
            <td>部门：<input id="Text1" type="text" value="@Model.部门" onfocus=this.blur() style="border:0px; width:50px" /></td>

            <td>类型:<input id="Text1" type="text" value="@Model.奖惩区分 @Model.金额 元" onfocus=this.blur() style="border:0px;" /></td>


        </tr>

        <tr><td>原因：</td><td colspan="4"><textarea id="TextArea1" rows="4" cols="80" style="resize:none;border:0px" onfocus=this.blur()>@Model.原因</textarea></td></tr>
        <tr><td>提交人意见：</td><td colspan="4"><textarea id="TextArea1" rows="4" cols="80" style="resize:none;border:0px" onfocus=this.blur()>@Model.提交人意见</textarea></td></tr>
        <tr><td>人事意见：</td><td colspan="2"><textarea id="TextArea1" rows="4" cols="80" style="resize:none;border:0px" onfocus=this.blur()>@Model.人事意见</textarea></td></tr>

    </table>
   <input id="Button1" type="button" value="同意√" onclick="TG(@Model.ID)" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input id="Button1" type="button" value="拒绝×" onclick="JJ(@Model.ID)" />
</div>
<script>
    function TG(ID) {
        $.ajax({
            type: 'post',
            url: '/XBK/TG/'+ID,
            success: function (obj)
            {
               
                if (obj > 0) {
                   
                    location.href = '/XBK/JcIndex';

                }
                else {
                    alert('失败');
                }
            }
        })
    }
    function JJ(ID) {
        $.ajax({
            type: 'post',
            url: '/XBK/JJ/' + ID,
            success: function (obj) {

                if (obj > 0) {

                    location.href = '/XBK/JcIndex';

                }
                else {
                    alert('失败');
                }
            }
        })
    }
</script>